package com.iplay.实战java高并发程序设计.chapter5.c55;

/**
 * @author dangwu
 * @since 2021/11/5 4:50 下午
 */
public class Client {
    public Data request(final String qs){
        final FutureData futureData = new FutureData();
        new Thread(){
            @Override
            public void run() {//RealData的构建很慢，所以在单独的线程中进行
                RealData realData = new RealData(qs);
                futureData.setRealData(realData);
            }
        }.start();
        return futureData;
    }

}
